home *** CD-ROM | disk | FTP | other *** search
/ Internet.Works 40 / Issue 40.iso / pc / PCSoftware / HTML Tool 3.5 / htmltool.exe / _SETUP.1 / Logon to FTP.scp < prev    next >
Encoding:
Text File  |  2000-03-06  |  1.4 KB  |  59 lines

  1. <HTMLtool>This JavaScript lets you log on to an FTP server</HTMLtool>
  2.  
  3. <!-- TWO STEPS TO INSTALL FTP SERVER LOGIN:
  4.  
  5.   1.  Copy the coding into the HEAD of your HTML document
  6.   2.  Add the last code into the BODY of your HTML document  -->
  7.  
  8. <!-- STEP ONE: Paste this code into the HEAD of your HTML document  -->
  9.  
  10. <HEAD>
  11.  
  12. <SCRIPT LANGUAGE="JavaScript">
  13.  
  14. <!-- Begin
  15. function Login(form) {
  16. var username = form.username.value;
  17. var password = form.password.value;
  18. var server = form.server.value;
  19. if (username && password && server) {
  20. var ftpsite = "ftp://" + username + ":" + password + "@" + server;
  21. window.location = ftpsite;
  22. }
  23. else {
  24. alert("Please enter your username, password, and FTP server's address.");
  25.    }
  26. }
  27. //  End -->
  28. </script>
  29. </HEAD>
  30.  
  31. <!-- STEP TWO: Copy this code into the BODY of your HTML document  -->
  32.  
  33. <BODY>
  34.  
  35. <center>
  36. <form name=login>
  37. <table width=250 border=1 cellpadding=3>
  38. <tr>
  39. <td colspan=2 align=center><b><h2>Logon to FTP Server!</h2></b></td>
  40. </tr>
  41. <tr>
  42. <td>Username:</td>
  43. <td><input type=text name=username size=20></td>
  44. </tr>
  45. <tr>
  46. <td>Password:</td>
  47. <td><input type=password name=password size=20></td>
  48. </tr>
  49. <tr>
  50. <td>Server:</td>
  51. <td><tt>ftp://</tt><input type=text name=server size=14></td>
  52. </tr>
  53. <tr>
  54. <td colspan=2 align=center>
  55. <input type=button value="Login!" onClick="Login(this.form)"></td>
  56. </tr>
  57. </table>
  58. </form>
  59. </center>